import request from './request'


//班组查询
export function getTeams(params) {
    return request(`api/teamGroup/page`, 'get', params || {})
}

//工程类型下拉
export function getTypes(params) {
    return request(`api/borrowRecord/getProjectType`, 'get', params || {})
}
//借用模板查询(去重)
export function getBorrowTemplates(params) {
    return request(`api/borrowTemplate/getDistinctTemplateList`, 'get', params || {})
}
//根据模板名称获取借用模版详情
export function getTemplateByName(params) {
    return request(`api/borrowTemplate/getTemplateByName`, 'get', params || {})
}
//根据类型编号和仓库id查询工器具库存
export function selectByTypeCode(params) {
    return request(`api/toolStorage/selectByTypeCodeAndWarehouseId`, 'get', params || {})
}
//根据物资大类级联菜单
export function getCascader(params) {
    return request(`api/material/getCascadeMenu`, 'get', params || {})
}
//根据物资名称查询物物资规格型号
export function getAllMaterialsSpec(params) {
    return request(`api/material/getAllMaterialsSpec`, 'get', params || {})
}
//分页查询工器具出入库数据
export function borrowRecord(params) {
    return request(`api/borrowRecord/page`, 'get', params || {})
}
//根据凭证编号查询工器具出入库数据
export function selectByCode(params) {
    return request(`api/borrowRecord/selectByCode`, 'get', params || {})
}

//添加实时借用-归还凭证
export function repairAdd(params) {
    return request(`api/borrowRecord/realTimeAdd`, 'post', params || {})
}

//选择模板
export function seleTem(params) {
    return request(`api/borrowTemplate/getTemplateByName`, 'get', params || {})
}

//结算台拿取轮询
export function getGoods(params) {
    return request(`api/borrowRecord/getCounterShoppingCart`, 'get', params || {})
}
//手动添加数据
export function addGoods(params) {
    return request(`api/borrowRecord/addAndUpdateCounterShoppingCart`, 'get', params || {})
}
//结算台-清空结算台借出购物车缓存
export function clearShopCart(params) {
    return request(`api/borrowRecord/clearShopCart`, 'get', params || {})
}

//结算台-归还上架-根据凭证编号获取出库单
export function getBorrowRecordByCode(params) {
    return request(`api/borrowRecord/getBorrowRecordByCode`, 'get', params || {})
}
//结算台-结算台归还轮询接口
export function getCounterShoppingReturn(params) {
    return request(`api/borrowRecord/getCounterShoppingReturn`, 'get', params || {})
}
//结算台-结算台归还手动修改批次物品接口
export function updateCounterShoppingReturn(params) {
    return request(`api/borrowRecord/updateCounterShoppingReturn`, 'get', params || {})
}
//结算台-清空结算台归还上架缓存
export function clearShopReturn(params) {
    return request(`api/borrowRecord/clearShopReturn`, 'get', params || {})
}

//分页查询工器具实时库存
export function toolStorage(params) {
    return request(`api/toolStorage/page`, 'get', params || {})
}

//灯光查找指引-绿灯闪烁
export function lightGuide(params) {
    return request(`api/borrowRecord/searchGoods`, 'get', params || {})
}
//录入借用人信息
export function setUserInfo(params) {
    return request(`api/borrowRecord/setUserInfo`, 'post', params || {})
}


//是否跳过信息录入直接进入购物车页面
export function isSkip(params) {
    return request(`api/borrowRecord/isSkip`, 'get', params || {})
}


//获取借用人信息
export function getUserInfo(params) {
    return request(`api/borrowRecord/getUserInfo`, 'get', params || {})
}
//是否跳过购物车页面(借用)
export function isSkipShop(params) {
    return request(`api/borrowRecord/isSkipShop`, 'get', params || {})
}

//是否跳过购物车页面(归还)
export function getShopReturnData(params) {
    return request(`api/borrowRecord/getShopReturnData`, 'get', params || {})
}
